<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/6
 * Time: 20:55
 */


require_once "dataSQL.php";
require_once "rootDB.php";

$rootDB=new rootDB();
$id=$_POST['id'];
    $data = $rootDB->dell_admin($id);
    try {
        $result = $data;
        if ($result) {
            $dat = array(
                'message' =>"删除成功",
            );
            echo json_encode($dat);
        } else {
            $dat = array(
                'message' =>"删除失败",

            );
            echo json_encode($dat);

        }
    }
    catch (Exception $e) {

        // 回滚事务
        // $pdo->rollback();
        echo $e->getMessage();}



